package com.zl.controller;

import com.zl.model.User;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class StudentBeans {
    //@Bean(name = "student_user1")//方法注解
    //@Bean("student_user1")
    @Bean(name = {"student1","student2"})
    public User setUse() {
        User user = new User();
        user.setId(1);
        user.setName("StudentBeans小李");
        user.setAge(16);
        return user;
    }

}
